import http from "@/api/index";

// 文件上传模块
namespace Upload {
  export interface ResFileUrl {
    fileUrl: string;
  }
}

/**
 * @name 文件上传模块
 */
// 图片上传
export const uploadImg = (params: FormData) => {
  return http.post<Upload.ResFileUrl>('/geeker' + `/file/upload/img`, params);
};

// 视频上传
export const uploadVideo = (params: FormData) => {
  return http.post<Upload.ResFileUrl>('/geeker' + `/file/upload/video`, params);
};
